<?php
/**
 * Created by Phpstorm
 * User: 一个猫
 * Date: 2023/11/23
 * Time: 20:48
 */

namespace App\Http\Requests\Api;

class ChangePasswordRequest extends FormRequest
{
    public function rules()
    {
        return [
            'old_password' =>'required',
            'password' =>'required',
            'check_password' =>'required|same:password'
        ];
    }

    public function messages()
    {
        return [
            'old_password.required' => '旧密码不可为空！',
            'password.required' => '密码不可为空！',
            'check_password.required' => '确认密码不可为空！',
            'check_password.same' => '两次密码不一致！',
        ];
    }
}
